const express = require("express");
const { AuthCheck } = require("../middleware/authcheck");
const ApiRouter = express.Router();

const whiteList = ["/login", "/register"];

//http://xxx:3000/api/account/login
ApiRouter.post(
  "/account/login",
  require("../controller/AccountController").Login
);
ApiRouter.post(
  "/account/register",
  require("../controller/AccountController").Register
);

ApiRouter.get(
  "/user/getUsers",
  AuthCheck(whiteList),
  require("../controller/userController").GetUsers
);


module.exports = ApiRouter;
